<style lang='scss' type='stylesheet/scss' scoped>
.as-dropdown {
  margin-bottom: 10px;
}
</style>
<template>
  <div>
    <as-h2>placement</as-h2>
    <as-card :text="text"
             title="设置 placement 可以调整 dropdown 的方向，top 上方显示 / bottom 下方显示，默认为 bottom">
      <as-dropdown placement="top">
        <span>接下来做什么 <i class="el-icon-arrow-down"></i></span>
        <as-dropdown-menu slot="dropdown">
          <as-dropdown-item disabled>看电视</as-dropdown-item>
          <as-dropdown-item>学习</as-dropdown-item>
          <as-dropdown-item disabled>吃火锅</as-dropdown-item>
          <as-dropdown-item disabled>吃烤肉</as-dropdown-item>
        </as-dropdown-menu>
      </as-dropdown>
    </as-card>
  </div>
</template>

<script type="text/ecmascript-6">
import { mapGetters } from "vuex";
export default {
  name: "",
  computed: {
    ...mapGetters(["isMobile"])
  },
  data() {
    return {
      text: `<template>
   <as-dropdown placement="top">
     <span>接下来做什么 <i class="el-icon-arrow-down"></i></span>
     <as-dropdown-menu slot="dropdown">
       <as-dropdown-item disabled>看电视</as-dropdown-item>
       <as-dropdown-item>学习</as-dropdown-item>
       <as-dropdown-item disabled>吃火锅</as-dropdown-item>
       <as-dropdown-item disabled>吃烤肉</as-dropdown-item>
     </as-dropdown-menu>
   </as-dropdown>
 </template>`
    };
  }
};
</script>
